﻿@using KRM.Core
@model List<KRM.Core.tblBook>
@{
    ViewBag.Title = "Requests";
    Layout = "/Views/Shared/_HRLayout.cshtml";
}
         <!-- begin sample portlet configuration modal form-->               
         <div aria-hidden="true" aria-labelledby="mymodallabel" role="dialog" tabindex="-1" id="portlet-config" class="modal fade">
            <div class="modal-dialog">
               <div class="modal-content">
                  <div class="modal-header">
                     <button aria-hidden="true" data-dismiss="modal" class="close" type="button"></button>
                     <h4 class="modal-title">modal title</h4>
                  </div>
                  <div class="modal-body">
                     widget settings form goes here
                  </div>
                  <div class="modal-footer">
                     <button class="btn blue" type="button">save changes</button>
                     <button data-dismiss="modal" class="btn default" type="button">close</button>
                  </div>
               </div>
               <!-- /.modal-content -->
            </div>
            <!-- /.modal-dialog -->
         </div>
         <!-- /.modal -->
         <!-- end sample portlet configuration modal form-->
         <!-- begin style customizer -->
         
         <!-- end begin style customizer -->            
         <!-- begin page header-->
         <div class="row">
            <div class="col-md-12">
               <!-- begin page title & breadcrumb-->
               <h3 class="page-title">
                  Holiday Requests
               </h3>
               <ul class="page-breadcrumb breadcrumb">
                   <li>
                     <i class="icon-home"></i>
                     <a href="/Home">Home</a> 
                     <i class="icon-angle-right"></i>
                  </li>
                  <li>
                     <a href="#">Pesonal</a>
                     <i class="icon-angle-right"></i>
                  </li>
                  <li><a href="#">Requests</a></li>
               </ul>
               <!-- end page title & breadcrumb-->
            </div>
         </div>
         <!-- end page header-->
<!-- begin page content-->
<div class="row">
    <div class="col-md-12">
        @Html.Partial("Partial/_MessageResult")
    </div>
</div>
        <div class="row">
         <div class="table-toolbar">
            <div class="col-md-12">
             
         <a href="/HolidayRequest/CreateRequest" class="btn green">Add New <i class="icon-plus"></i></a>
         </div>
        </div>
          <div class="col-md-12">                
                         <table class="table table-striped table-bordered table-hover dataTable dataTable-customsort">
                             <thead>
                                 <tr> 
                                     <th> Request </th>                      
                                     <th >Start Date</th>
                                     <th >End Date</th>
                                     <th class="sort-desc">Book Date</th>
                                     <th >Status</th>                                                                     
                                 </tr>
                             </thead>
                             <tbody>
                               @foreach(var item in Model)
                               {
                                  <tr>
                                     <td class="" style="text-align: center"><a href="/HolidayRequest/ViewHolidayRequest/@item.Id">@item.tblBookType.Name</a>
                                     </td>
                                     <td class=""style="text-align: center">@item.StartDate.ToString("MM/dd/yyyy")</td>
                                     <td class=""style="text-align: center">@item.EndDate.ToString("MM/dd/yyyy")</td>
                                     <td class=""style="text-align: center">@item.DateCreated</td>

                                     <td class=""style="text-align: center">  @switch (@item.BookStatusId)
                                              {
                                                  case (int)BookStatus.Pending :<span class="label label-bookstatus-pending">@item.tblBookStatu.Name</span>
                                                      break;
                                                  case (int)BookStatus.Accepted :<span class="label  label-bookstatus-accepted">@item.tblBookStatu.Name</span>
                                                      break;
                                                  case (int)BookStatus.Declined :<span class="label  label-bookstatus-declined">@item.tblBookStatu.Name</span>
                                                      break;
                                                  case (int)BookStatus.Canceled :<span class="label  label-bookstatus-canceled">@item.tblBookStatu.Name</span>
                                                      break;
                                              }

                                     </td>
                                 </tr>                      
                               }
                             </tbody>
                         </table>                            
                 
                 </div>
        </div>          
         <!-- end page content-->
      